package globalmemo

import (
	"github.com/coocood/freecache"
	cmap "github.com/streamrail/concurrent-map"
)

var (
	MemoCacheGw          cmap.ConcurrentMap // key= Prefix + gwmac + 消息序列号 | value = time.stamp redis同理
	MemoCacheDev         cmap.ConcurrentMap //`[gw] Queue`
	MemoCacheScanTimeOut cmap.ConcurrentMap // 扫描超时处理专用

	//主缓存服务专用
	MemoCacheService cmap.ConcurrentMap

	//终端设备连接所用 `key = devMac |  map[gwmac + id] TerminalInfo `
	MemoCacheDownPriority cmap.ConcurrentMap

	//终端信息专用缓存 暂无用
	BleFreeCacheDevInfo = freecache.NewCache(10 * 1024 * 1024)

	//终端连接信息专用
	BleFreeCacheDevConnInfo = freecache.NewCache(10 * 1024 * 1024)

	//应答消息专用缓存
	BleFreeCacheDevResponseInfo = freecache.NewCache(10 * 1024 * 1024)

	//网络信息
	SocketFreeCache = freecache.NewCache(10 * 1024 * 1024)

	//服务对应特征 //dev == key | map[服务handle] node
	BleCacheServiceForChar = freecache.NewCache(10 * 1024 * 1024)

	//特征对应服务 //dev == key | map[特征handle] node
	BleCacheCharacterForSvc = freecache.NewCache(10 * 1024 * 1024) //character ===》 存储特征值

	//标准特征值对应dev handle 具体特征
	NusCharacterDevForHandle cmap.ConcurrentMap

	//蓝牙设备是否需要时间同步
	MemoBleTimeSynchron cmap.ConcurrentMap
)
